###FIRST RUN Study 1 Data Code.R###

####TABLE 2####
table2 <- matrix(NA,2,7)

table2[1,1] <- mean(study1_fu$CB_SQ[study1_fu$CB_TREAT==0],na.rm=T)
table2[1,2] <- mean(study1_fu$CB_SQ[study1_fu$CB_TREAT==1],na.rm=T)
table2[1,3] <- table2[1,2] - table2[1,1]
table2[1,4] <- mean(study1_fu$CB_SQ[study1_fu$CB_TREAT==2],na.rm=T)
table2[1,5] <- table2[1,4] - table2[1,1]
table2[1,6] <- mean(study1_fu$CB_SQ[study1_fu$CB_TREAT==3],na.rm=T)
table2[1,7] <- table2[1,6] - table2[1,1]
table2[2,1] <- sum(table(study1_fu$CB_SQ[study1_fu$CB_TREAT==0]))
table2[2,2] <- sum(table(study1_fu$CB_SQ[study1_fu$CB_TREAT==1]))
table2[2,3] <- as.numeric(t.test(study1_fu$CB_SQ[study1_fu$CB_TREAT==1],study1_fu$CB_SQ[study1_fu$CB_TREAT==0])[3])
table2[2,4] <- sum(table(study1_fu$CB_SQ[study1_fu$CB_TREAT==2]))
table2[2,5] <- as.numeric(t.test(study1_fu$CB_SQ[study1_fu$CB_TREAT==2],study1_fu$CB_SQ[study1_fu$CB_TREAT==0])[3])
table2[2,6] <- sum(table(study1_fu$CB_SQ[study1_fu$CB_TREAT==3]))
table2[2,7] <- as.numeric(t.test(study1_fu$CB_SQ[study1_fu$CB_TREAT==3],study1_fu$CB_SQ[study1_fu$CB_TREAT==0])[3])
###############
